﻿using FluentValidation.Attributes;
using Nop.Services.Localization;
using Nop.Web.Framework;
using Nop.Web.Framework.Mvc;
using Nop.Web.WindAlert.Validators;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Nop.Web.Models.WindAlert
{
    public partial class ListCommentModel : BaseNopEntityModel
    {
        public ListCommentModel()
        {
            Comments = new List<SpotCommentModel>();
        }
        public bool IsAuthenticated { get; set; }
        public int NumberOfComments { get; set; }
        public IList<SpotCommentModel> Comments { get; set; }
        public int SpotId { get; set;}
    }

    public partial class SpotCommentModel : BaseNopEntityModel
    {
        public int CustomerId { get; set; }
        public string CustomerName { get; set; }
        public string CustomerAvatarUrl { get; set; }
        public string CommentText { get; set; }
        public DateTime CreatedOn { get; set; }
        public bool AllowViewingProfiles { get; set; }
        public string PictureUrl { get; set; }
        public string PictureUrlFullSize { get; set; }
        public bool IsCustomerAllowedToEditDeleteComment { get; set; }
        public string SpotName { get; set; }
    }

    [Validator(typeof(SpotCommentValidator))]
    public partial class AddSpotCommentModel : BaseNopEntityModel
    {
        public AddSpotCommentModel()
        {
            AvailableSpots = new List<SelectListItem>();
            AvailableSpotsSort = new List<SelectListItem>();
        }

        [AllowHtml]
        public string CommentText { get; set; }

        [UIHint("Picture")]
        public int PictureId { get; set; }

        public int PictureMaximumSizeBytes { get; set; }
        public bool DisplayCaptcha { get; set; }
        public IList<SelectListItem> AvailableSpots { get; set; }
        public IList<SelectListItem> AvailableSpotsSort { get; set; }

        public int SpotId { get; set; }
    }
}